package customer.mysql.synthe.procedure.mysql.controller;

import customer.mysql.synthe.procedure.mysql.bean.Product;
import customer.mysql.synthe.procedure.mysql.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ProductController {
    @Autowired
    private ProductService productService;
    @PostMapping("/market")
    public  List<Product>  queryMarketPriceResult(){
        return productService.queryMarketPriceResult();
    }

    @PostMapping("/procedure")
    public  List<Product>  queryProductInfo(int price){
        return productService.queryProductInfo(price);
    }
}
